{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/registration.css">
<script type="text/javascript" src="{$siteroot}/includes/js/interest.js"></script>
<script type="text/javascript" src="{$siteroot}/greybox/greybox.js"></script>
<link href="{$siteroot}/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" />
{/strip}
{literal}
<script type="text/javascript">
function paymentfunction(planid)
{
	
	document.getElementById("plan_id").value=planid;		
	
}
function testfunction(defval)
{
	var conf = confirm('Are you sure do you want to buy this lead?');
	//default_videoalert(defval);
	if(conf == true){
		var GB_ANIMATION = true;
		var url=SITEROOT+'/leads/'+defval+'/interest/';
        //var t = this.title || jQuery(this).text() || this.href;
        GB_show("",url,500,500);
         return false;
    
		//window.location=SITEROOT+'/leads/'+defval+'/interest/';
	}
}
</script>
{/literal}
<!--Gray box-->
{literal}
<script type="text/javascript">
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.greybox").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
        GB_show("",this.href,400,400);
         return false;
       });
     });
</script>
{/literal}

{include file=$header_end}
   <!-- MIDDLE CONTAIN GOES HERE -->
<section class="middle_portion">
	<section class="inner_head"><span class="lF" style="color:#454545" >Lead Detail</span> <a href="{$siteroot}/leads/" class="rF">BACK</a> <section class="clear"></section></section>
    <section class="inner_containstart">
    <section class="buyerinfo">
    <!--
       <dl>
        <dt>Full Name :</dt>
        <dd>{$jobdetArray.username|ucfirst}</dd>
        <section class="clear"></section>
      </dl>
      -->
      <dl>
        <dt>Industry Category:</dt>
        <dd>{$jobdetArray.tradename}</dd>
        <section class="clear"></section>
       </dl>
       
       <dl>
        <dt>Enquiry Type:</dt>
        <dd>{$jobdetArray.jobtypename}</dd>
        <section class="clear"></section>
       </dl>
       
       <dl>
        <dt>Budget:</dt>
        <dd>Under ${$jobdetArray.budgetname}</dd>
        <section class="clear"></section>
       </dl>
       
        <dl>
        <dt>Postcode:</dt>
        <dd>{$userDetArray.postalcode}</dd>
        <section class="clear"></section>
       </dl>
       
        <dl>
        <dt>Work Start In:</dt>
        <dd>{$jobdetArray.workstart|upper}</dd>
        <section class="clear"></section>
       </dl>
       
       
        
	<dl>
        <dt>Job Description:</dt>
        <dd>{$jobdetArray.job_desc}</dd>
        <section class="clear"></section>
       </dl>
     {if ($userDetArray.leads neq '0' && $userDetArray.expiry_date gt $smarty.now|date_format:"%Y-%m-%d") || $getuserjobviewArr.id neq '' }  
	    {if $getuserjobviewArr.id eq ''}
        <dl>
        <dt>&nbsp;</dt>
        <dd>If you are interested then please click on below button.</dd>
        <section class="clear"></section>
       </dl>
       {/if}
       
        <dl>
        <dt>&nbsp;</dt>
        <dd>
            <!-- <input type="button" {if $getuserjobviewArr.id eq ''} onclick="window.location.href='{$siteroot}/leads/{$smarty.get.id1}/{'open'|base64_encode}/buylead/'" value="Interest" {else} value="Purchase" {/if} name="btn_interest" id="btn_interest"  class="blue_btn margintp_bt " > -->
            <a href="javascript:;" {if $getuserjobviewArr.id eq ''} onclick="return testfunction('{$smarty.get.id1}');" class="blue_btn margintp_bt" {else} class="blue_btn margintp_bt" {/if}  > {if $getuserjobviewArr.id eq ''}Interest{else}Purchase{/if} </a>            
        </dd>
        <section class="clear"></section>
       </dl>
     {else}
     
     	<dl>
        <dt></dt>
        {if $userDetArray.leads eq '0'}
	        <div style="padding:0px;"><div class="error_msg" style="padding:0px;"> <span>You do not have any leads. Please select to purchase individual lead or one of our Lead Plans</span></div></div>
        {else}
            <div style="padding:0px;"><div class="error_msg" style="padding:0px;"> <span>Sorry your plan has expired. Please choose one of the options below.</span></div></div>
        {/if}	    
        <section class="clear"></section>
     	</dl>
               
         <dl>
        <dt></dt>
        <dd style="margin-left:125px; margin-top:10px;"><strong>Membership Plan Renewal</strong></dd>
        <section class="clear"></section>
     	</dl>        
        <dl>
        <form id="frmplantype" name="frmplantype" method="POST" action="{$siteroot}/leads/payamount/"> 
        <section>            
        <section style="margin:20px 0px 20px 130px;">
        
        {if $getuserdet.plannid eq '1'}
        <section class="price_wrapper lF">    
            <section class="blu_price_block">
                <section class="tiltle">            
                <input type="radio" class="radio" name="membershipplan" value="{$getplandetail[0].price}" {if $getuserdet.plannid eq '1'} checked="checked" {/if} onclick="return paymentfunction({$getplandetail[0].plan_id});" />{$getplandetail[0].name|ucfirst}</section>            
                <section class="price"><strong>${$getplandetail[0].price}</strong></section>
                <section class="lead">{$getplandetail[0].leads|ucfirst} LEADS</section>
            </section>
            <section class="clear"></section>
        </section> 
        {/if}
        {if $getuserdet.plannid eq '1' || $getuserdet.plannid eq '2'}
        <section class="price_wrapper lF">    
            <section class="org_price_block">
                <section class="tiltle">            
                <input type="radio" class="radio" name="membershipplan" value="{$getplandetail[1].price}" {if $getuserdet.plannid eq '2'} checked="checked" {/if} onclick="return paymentfunction({$getplandetail[1].plan_id});" />{$getplandetail[1].name|ucfirst}</section>            
                <section class="price"><strong>${$getplandetail[1].price}</strong></section>
                <section class="lead">{$getplandetail[1].leads|ucfirst} LEADS</section>
            </section>
            <section class="clear"></section>
        </section> 
        {/if}
        {if $getuserdet.plannid eq '1'|| $getuserdet.plannid eq '2' || $getuserdet.plannid eq '3' || $getuserdet.plannid eq '4'}
        <section class="price_wrapper lF">    
            <section class="gry_price_block">
                <section class="tiltle">            
                <input type="radio" class="radio" name="membershipplan" value="{$getplandetail[2].price}" {if $getuserdet.plannid eq '3' || $getuserdet.plannid eq '4'} checked="checked" {/if} onclick="return paymentfunction({$getplandetail[2].plan_id});" />{$getplandetail[2].name|ucfirst}</section>            
                <section class="price"><strong>${$getplandetail[2].price}</strong></section>
                <section class="lead">{$getplandetail[2].leads|ucfirst} LEADS</section>
            </section>
            <section class="clear"></section>
        </section> 
        {/if}
        {if $getuserdet.plannid eq '1'}
        <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[0].plan_id}"  /> 
        {elseif $getuserdet.plannid eq '2'}
        <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[1].plan_id}"  /> 
        {elseif $getuserdet.plannid eq '3'}
        <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[2].plan_id}"  /> 
        {elseif $getuserdet.plannid eq '4'}
        <input type="hidden" name="plan_id" id="plan_id" value="{$getplandetail[2].plan_id}"  /> 
        {/if}
        <input type="hidden" name="jobid" id="jobid" value="{$smarty.get.id1}"  />  
        <section class="clear"></section>
        </section>
          <section style="width:255px;" class="rF"><input type="submit" name="btnplan" id="btnplan" value="Continue" class="blue_btn" ></section> 	     <section class="clear"></section>  
        </section>
        <section class="clear"></section>
        </form>
     	</dl>        
       
        
        <section class="clear"></section>	
     {/if}  
       
    </section>      

    </section>
</section>
{include file=$footer}